<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>服装款式</title>
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
<script src="${ctxStatic}/js/DateTimePicker.js"></script>
<script src="${ctxStatic}/js/layer.js"></script>
<script src="${ctxStatic}/js/style.js"></script>
<script src="${ctxStatic}/dateCalendar/WdatePicker.js"></script>
<link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
<link rel="stylesheet" href="${ctxStatic}/css/list.css">
<script>
	$(document).ready(function() {
		$("#orderNo").focus();
	});

	//检索 
	function searchListForm() {
		if ($("#orderNo").val() == "") {
			tipParent("请输入订单号");
			return;
		}
		$("#activity_pane").showLoading();
		$.post("${ctx}/produce/workticket/searchListByOrder?orderEntity.orderNo=" + $("#orderNo").val(), "" ,function(result) {
			var listHtml = result["produceWorkticketByOrder"];
			var pageHtml = result["page"];
			$("#listHtml").html(listHtml);
			$("#paging").html(pageHtml);
			$("#activity_pane").hideLoading();
			if (listHtml == "") {
				tipParent("无数据");
			}
		}, 'json');
	}
	/**
	 * 扫码自动回车
	 */
	function  keyLogin(e) {
        var theEvent = window.event || e;
        var code = theEvent.keyCode || theEvent.which;
        if (e.key=='Enter') {
        	$("#searchBtn").click();
        } 
    }
	
	//重置
	function clean() {
		$("#orderNo").val("");
	}
</script>

</head>
<body>
	<form id="searchForm" onkeydown="if(event.keyCode==13){return false;}">
		<div class="listArea" id="activity_pane">
			<div class="listBg">
				<div class="searchArea clearfix">
					<div class="searchLeft clearfix" >
						<div class="searchInp clearfix" >
							<!-- 订单号  -->
							<p>订单号</p>
							<div class="searchInp">
								<input type="text" id="orderNo" name="orderEntity.orderNo" value="" onkeydown="keyLogin(event);"  onfocus="javascript:this.select();"/>
							</div>
						</div>
					</div>
					<div class="searchRight clearfix">
						<button type="button" id="searchBtn" onclick="searchListForm();">
							<spring:message code="commom_check" />
						</button>
						<button type="button" onclick="clean();">
							<spring:message code="common_reset" />
						</button>
					</div>
				</div>
				<div class="tableArea" >
					<div class="tableScrollSm tabSm" style="height: 710px;overflow: auto;width: 1142px;" >
						<table cellpadding="0" class="tableHead">
							<thead>
								<tr>
					                <!-- No -->
					                <th><p class="tab-ddcz"><spring:message code="common_no" /></p></th>
					                <!-- 生产制单号 -->
					                <th><p style="width:140px;"><spring:message code="produce_workticket_detail_produtionNo" /></p></th>
					                <!-- 合同号 -->
					                <th><p style="width:140px;"><spring:message code="produce_workticket_detail_contractNo" /></p></th>
					                <!-- 生产号 -->
					                <th><p style="width:140px;"><spring:message code="produce_workticket_detail_styleNo" /></p></th>
					                <!-- 订单号 -->
					                <th><p style="width:144px;"><spring:message code="produce_workticket_detail_orderNo" /></p></th>
					                <!-- 工序名称 -->
					                <th><p style="width:250px;"><spring:message code="produce_workticket_detail_operatingName" /></p></th> 
					                <!-- 人员-->
					                <th><p style="width:100px;"><spring:message code="produce_workticket_detail_user" /></p></th>
					                <!-- 日期 -->
					                <th><p style="width:150px;"><spring:message code="produce_workticket_detail_date" /></p></th>                              
					            </tr>
							</thead>
						</table>
						<table cellpadding="0" class="tableBody">
							<tbody id="listHtml">
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div id="paging"></div>
		</div>
	</form>
</body>
</html>
